/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.oa.action.system;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.oa.mapper.system.CalendarTmeTestMapper;
public class CalendarTmeTest extends BaseAction
{
    @Autowired(required=false)
	private CalendarTmeTestMapper mapper;
    /**
    日历时间测试
    */
    
    public Map calendarTmeTest() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_year=mapper.s_year(params);
        s_year.setSelectNone("年");
        result.put("s_year", s_year);
        
        
        SQLList<SQLMap> s_month=mapper.s_month(params);
        s_month.setSelectNone("月");
        result.put("s_month", s_month);
        
        
        
        
        Object CMID3 =mapper.CMID3(params);
        result.put("CMID3", CMID3);
        
        
        params.def("CMIDSEL1",SQL.getYear());
        Object CMIDSEL1 =mapper.CMIDSEL1(params);
        result.put("CMIDSEL1", CMIDSEL1);
        
        
        params.def("CMIDSEL2",SQL.getMonth());
        Object CMIDSEL2 =mapper.CMIDSEL2(params);
        result.put("CMIDSEL2", CMIDSEL2);
        
        
        Object role_id =mapper.role_id(params);
        result.put("role_id", role_id);
        
        
        SQLList<SQLMap> s_calendar=mapper.s_calendar(params);
        result.put("s_calendar", s_calendar);
        
        
        SQLList<SQLMap> s_im=mapper.s_im(params);
        SQLMap s_im_emt=s_im.getExistfirst();
        result.put("s_im", s_im_emt);
        
        return result;
    }
    /**
    工作时间测试
    */
    
    public Map testTime() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_a=new SQLList();
        SQLMap s_a_emt=s_a.getExistfirst();
        result.put("s_a", s_a_emt);
        
        return result;
    }
    /**
    工作时间单独测试
    */
    
    public Map workTimeTest() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        Object CMIDdate =mapper.CMIDdate(params);
        result.put("CMIDdate", CMIDdate);
        
        
        Object CMIDtime =mapper.CMIDtime(params);
        result.put("CMIDtime", CMIDtime);
        
        
        SQLList<SQLMap> t_a=mapper.t_a(params);
        SQLMap t_a_emt=t_a.getExistfirst();
        result.put("t_a", t_a_emt);
        
        return result;
    }
    /**
    每一天工作时间测试
    */
    
    public Map everydayTest() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_time=mapper.s_time(params);
        result.put("s_time", s_time);
        
        return result;
    }
    /**
    工作时间测试修改
    */
    
    public Map testTimeSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        result.put("infolist", workTime.debugList);
        
        
        result.put("work_time", getAfterWorkHour(
        getParameter("begin_day")
        ,getParameter("begin_time")
        ,getParameter("CMIDcode")
        ,getParameter("CMID7")
        ));
        
        return result;
    }
    /**
    工作时间单独测试修改
    */
    
    public Map workTimeTestSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        result.put("infolist", workTime.debugList);
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        Object t_date =
        mapper.t_date(params);
        result.put("t_date", t_date);
        
        
        Object t_time =
        mapper.t_time(params);
        result.put("t_time", t_time);
        
        
        Object sumtime =
        mapper.sumtime(params);
        result.put("sumtime", sumtime);
        
        
        Object hourtime =
        mapper.hourtime(params);
        result.put("hourtime", hourtime);
        
        
        result.put("work_time", getAfterWorkHour(
        getParameter("begin_day")
        ,getParameter("begin_time")
        ,getParameter("CMIDcode")
        ,getParameter("CMID7")
        ));
        
        return result;
    }
}